#include "StdAfx.h"
#include "vanillaempoption.h"

namespace QuantLib {

    VanillaEmpOption::VanillaEmpOption(
		const Date &vestingStartDate,
        const boost::shared_ptr<StrikedTypePayoff>& payoff,
        const boost::shared_ptr<Exercise>& exercise)
    : VanillaOption(payoff, exercise), vestingStartDate_(vestingStartDate) 
	{}

    void VanillaEmpOption::setupArguments(PricingEngine::arguments* args) const 
	{
        VanillaOption::setupArguments(args);

		VanillaEmpOption::arguments* arguments = 
			dynamic_cast<VanillaEmpOption::arguments*>(args);

		 QL_REQUIRE(arguments != 0, "wrong engine type");

		 arguments->vestingStartDate = vestingStartDate_;
    }


    void VanillaEmpOption::arguments::validate() const 
	{
        VanillaOption::arguments::validate();

		// Will probably add more validating here later
    }
}